package com.atguigu.JVMDay02;

public class HeapSizeInitialDemo {
        public static void main(String[] args) {
            //返回java虚拟机中的堆内存总量
            long initialMemory = Runtime.getRuntime().totalMemory() / 1024;
            //返回java虚拟机试图使用的最大堆内存量
            long MaxMemory = Runtime.getRuntime().maxMemory() / 1024;
            //起始内存
            System.out.println("-Xms:"+initialMemory+"K,"+initialMemory/1024+"M");
            System.out.println("-Xmx:"+MaxMemory+"K,"+MaxMemory / 1024+"M");
        }
}
